/**
 *  Platypus: Page Layout and Typesetting Software (free at platypus.pz.org)
 *
 *  Platypus is (c) Copyright 2009-11 Pacific Data Works LLC. All Rights Reserved.
 *  Licensed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html)
 */
package org.pz.platypus;

import org.pz.platypus.utilities.FileSeparator;

/**
 * Locates where the configuration file is.
 * @author alb
 */
public class ConfigLocator
{
    private String location;

    /**
     * Compute the location of the config file based on the home directory. This is the most common use case.
     * @param gdd contains location of home directory
     */
    public ConfigLocator( GDD gdd )
    {
        location = gdd.homeDirectory + "config" + FileSeparator.get() + "Config.properties";
    }

    /**
     * Generally used for testing
     * @param Location location of the config file
     */
    public ConfigLocator( final String Location )
    {
        location = Location;
    }

    public String getLocation()
    {
        return( location );
    }
}
